package com.da.javatest.leetCode;

/**
 * @author chenlida
 * @date 2019/2/15 14:18
 * @description
 */
public class Code674 {
    public int findLengthOfLCIS(int[] nums) {
        if (nums.length < 2) {
            return nums.length;
        }
        int k = 1;
        int max = 1;
        for (int i = 0; i < nums.length - 1; i++) {
            if (nums[i + 1] > nums[i]) {
                k++;
                max = Math.max(max, k);
            } else {
                k = 1;
            }
        }
        return max;
    }
}
